package pri.chuang.wl.dao;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import pri.chuang.wl.model.Message;

@Component("messageDao")
public class MessageDaoImp implements MessageDao{
	
	@PersistenceContext
	private EntityManager entityManager;
	
	
	@Transactional
	public Message insertMsg(Message msg) {
		entityManager.persist(msg);
		return msg;
	}

}
